// JS 是一门表现力极强的语言
const xkl = {
    name:'肖',
    sex:'男',
    hasGirlFriend:'true',
    hometown:'宜春',
    room:'研一'
}
console.log(typeof xkl);
// 保守一点
const children = []
class Person{
    constructor(name, sex){
        this.name = name
        this.sex = sex;
        if(children.length >= 2){
            console.log('三孩已完成');
        }
    }
}
const hai1 = new Person('肖大郎');
children.push(hai1);
const hai2 = new Person('肖飞');
children.push(hai2);
const hai3 = new Person('肖战');
children.push(hai3);
console.log(children,typeof children);

{
    var blockI = 'i'
}
console.log(blockI);

const ele = document.getElementById('user');
const nameEle = document.createElement('div');
nameEle.innerText = xkl.name;
ele.appendChild(nameEle)
const sexEle = document.createElement('div');
sexEle.innerText = xkl.sex;
ele.appendChild(sexEle)

ele.innerHTML = `
    <div>姓名：${xkl.name}</div>
    <div>性别：${xkl.sex}</div>
`
